package com.muyu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.user.domain.SysUser;
import com.muyu.user.domain.req.SysUserPageReq;
import com.muyu.user.domain.req.SysUserSetLevelReq;
import com.muyu.user.domain.req.SysUserUpdReq;
import com.muyu.user.domain.resp.SysUserPageResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户管理数据层
 *
 * @author <a href="mailto:1416681852@qq.com">liuguoqiang</a>
 * @version 1.0
 * @description: 用户管理数据层
 * @date 2025/9/14 22:25
 */
@Mapper
public interface SysUserManageMapper extends BaseMapper<SysUser> {
    /**
     * 用户管理列表
     * @param page
     * @param sysUserPageReq
     * @return
     */
    Page<SysUserPageResp> selectUserPageList(@Param("page") Page<SysUserPageResp> page, @Param("req") SysUserPageReq sysUserPageReq);

    /**
     * 用户详情
     * @param userId
     * @return
     */
    SysUser getUserDetail(@Param("userId") Integer userId);

    /**
     * 给用户设置等级
     * @param sysUserSetLevelReq
     */
    void setUserLevel(SysUserSetLevelReq sysUserSetLevelReq);

    /**
     * 用户编辑
     * @param sysUserUpdReq
     */
    void setUserUpd(SysUserUpdReq sysUserUpdReq);
}
